package com.example.demo.service.impl;

import com.example.demo.dao.PrincipleMapper;
import com.example.demo.modal.Principle;
import com.example.demo.service.PrincipleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrincipleServiceImpl implements PrincipleService {
    @Autowired
    private PrincipleMapper principleMapper;

    @Override
    public int deleteByPrimaryKey(Integer princId) {
        return principleMapper.deleteByPrimaryKey(princId);
    }

    @Override
    public int insert(Principle record) {
        return principleMapper.insert(record);
    }

    @Override
    public int selectMaxId(){
        return principleMapper.selectMaxId();
    };

    @Override
    public int updateByPrimaryKey(Principle record) {
        return principleMapper.updateByPrimaryKey(record);
    }

    @Override
    public int save(Principle principle){
        return principleMapper.insert(principle);
    }

    @Override
    public List<Principle> selectAll() { return principleMapper.selectAll(); }

    @Override
    public List<Principle> findByprincId(int princId) { return principleMapper.selectByPrimaryKey(princId); }

    @Override
    public List<Principle> findByvariaAccou(String variaAccou){
        return principleMapper.selectByVariaAccou(variaAccou);
    };

    @Override
    public List<Principle> findBycalcuStyle(String calcuStyle){
        return principleMapper.selectByCalcuStyle(calcuStyle);
    };

    @Override
    public List<Principle> findByprincName(String princName){
        return principleMapper.selectByPrincName(princName);
    };

    @Override
    public List<Principle> findBynameEngli(String nameEngli){ return principleMapper.selectByNameEngli(nameEngli); };

    @Override
    public List<Principle> findByvariaNo1(String variaNo1){ return principleMapper.selectByVariaNo1(variaNo1); };

    @Override
    public List<Principle> findByvariaNo2(String variaNo2){ return principleMapper.selectByVariaNo2(variaNo2); };

    @Override
    public List<Principle> findByvariaNo3(String variaNo3){ return principleMapper.selectByVariaNo3(variaNo3); };

    @Override
    public List<Principle> findByvariaNo4(String variaNo4){ return principleMapper.selectByVariaNo4(variaNo4); };

}
